<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Annotation Types</title>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/488/1/.cp/book.css");</style>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/505/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1 style="text-align:center">Annotation Types</H1>
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.ui.editors.annotationTypes<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>3.0
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>An Annotation is a piece of information attached to a certain region of a text document. New kinds of annotations may be defined using this extension point. Annotations are attached to documents via their annotation model and may be displayed in text editors and views.

Annotation types form a hierarchy: an annotation type may refine another type by specifying it in its <code>super</code> attribute.

Some annotations serve as the UI counterpart of markers (see <code>org.eclipse.core.resources.IMarker</code>), while others exist on their own without having a persistable form. The mapping between markers and annotation types is defined by the optional <code>markerType</code> and <code>markerSeverity</code> attributes.<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
<p></p>
<p class="code SchemaDtd">&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.type">type</a>+)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST extension</p>
<p class="code SchemaDtdAttlist">point&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #IMPLIED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.type">type</a> EMPTY&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST type</p>
<p class="code SchemaDtdAttlist">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">markerType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IDREF #IMPLIED</p><p class="code SchemaDtdAttlist">super&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IDREF #IMPLIED</p><p class="code SchemaDtdAttlist">markerSeverity&nbsp;(0|1|2) </p>&gt;</p>
<p></p>
<p class="ConfigMarkupElementDesc">
A marker type definition.</p>
<br>
<ul class="ConfigMarkupAttlistDesc">
<li><b>name</b> - the unique name of this annotation type. This is used whenever an annotation type is referenced, e.g. when specifying an <code>org.eclipse.ui.editors.markerAnnotationSpecification</code>.</li>
<li><b>markerType</b> - the marker type that this annotation type corresponds to, if any</li>
<li><b>super</b> - the name of the parent type, if this type is a descendant of another annotation type</li>
<li><b>markerSeverity</b> - the optional severity of this annotation type, used for mapping an annotation type to a marker. Any out of IMarker.SEVERITY_INFO, IMarker.SEVERITY_WARNING, SEVERITY_ERROR.</li>
</ul>
<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>This is an excerpt from the plugin.xml for JDT UI, which adds the java compiler error and warning annotations:
<pre class="Example"><span class="code SchemaTag">
   &lt;extension
         point=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.editors.annotationTypes&quot;</span><span class="code SchemaTag">&gt;
      &lt;type
         name=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.ui.error&quot;</span><span class="code SchemaTag">
         super=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.workbench.texteditor.error&quot;</span><span class="code SchemaTag">
         markerType=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.core.problem&quot;</span><span class="code SchemaTag">
         markerSeverity=</span><span class="code SchemaCstring">&quot;2&quot;</span><span class="code SchemaTag">&gt;
      &lt;/type&gt;
      &lt;type
         name=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.ui.warning&quot;</span><span class="code SchemaTag">
         super=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.workbench.texteditor.warning&quot;</span><span class="code SchemaTag">
         markerType=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.core.problem&quot;</span><span class="code SchemaTag">
         markerSeverity=</span><span class="code SchemaCstring">&quot;1&quot;</span><span class="code SchemaTag">&gt;
      &lt;/type&gt;
      &lt;type
         name=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.ui.info&quot;</span><span class="code SchemaTag">
         super=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.workbench.texteditor.info&quot;</span><span class="code SchemaTag">
         markerType=</span><span class="code SchemaCstring">&quot;org.eclipse.jdt.core.problem&quot;</span><span class="code SchemaTag">
         markerSeverity=</span><span class="code SchemaCstring">&quot;0&quot;</span><span class="code SchemaTag">&gt;
      &lt;/type&gt;
   &lt;/extension&gt;
</span></pre>
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>See the org.eclipse.jface.text.source.Annotation class and the org.eclipse.ui.editors.markerAnnotationSpecification extension point.
<p></p>

<br>
<p class="note SchemaCopyright">
Copyright (c) 2001, 2008 IBM Corporation and others.<br>
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>

</p>
</BODY>
</HTML>
